#ifndef __USB__
#define __USB__
#ifdef __cplusplus
extern "C"
{
#endif
#include "Prot.h"
#include "stdarg.h"
#include "memory.h"
#ifdef __cplusplus
}
typedef struct
{
    uint8_t reprotid;
    uint8_t HatSwitch;
    uint16_t Buttons;
    uint16_t Axis_Rx;
    uint16_t Axis_Ry;
    int16_t Axis_X;
    int16_t Axis_Y;
    int16_t Wheel;
    uint16_t Throttle;
    uint16_t Brake;
    int16_t Force;
    uint16_t Last_Axis_Rx;
    uint16_t Last_Axis_Ry;
    uint16_t Last_Throttle;
    uint16_t Last_Brake;
} reprot_type;

typedef struct
{
    uint8_t Axis_Rx_ENABLE;
    uint8_t Axis_Ry_ENABLE;
    uint8_t Axis_Brake_ENABLE;
    uint8_t Axis_Throttle_ENABLE;
    uint16_t Axis_Rx_Low;
    uint16_t Axis_Ry_Low;
    uint16_t Brake_Low;
    uint16_t Throttle_Low;
    float Axis_Rx_Zoom;
    float Axis_Ry_Zoom;
    float Brake_Zoom;
    float Throttle_Zoom;
} Dead_Axis;

typedef struct
{
    int16_t Froce;
    uint8_t Flag;
} Froce_Type;

extern Froce_Type froce;
void Send_report(reprot_type *data, uint8_t len);

extern "C" void Froce_Callback(uint8_t Flag, int16_t Value);
extern "C" void USB_Printf(const char *str, ...);

extern "C" void USB_Control_Out_Callback(void *temp);
extern "C" void USB_Wheel_Out_Callback(void *temp);
extern "C" void Hid_Output_Callback(uint8_t *reprot);
#endif
#endif